if (GetLocale() == "zhCN") then
	MOD_MAP_TOOLKIT = {"地图工具", "ditugongju"};

	MOD_MAP_TOOLKIT_ENABLE_INSTANCE_MAPS = "开启副本地图";

	INSTANCE_MAPS_DISABLE_DELAY_TEXT = "|cff00c0c0<副本地图>|r 你已经关闭副本地图模块，该设置将在下次插件载入时生效。";
	MAP_PLUS_ENABLE_TEXT = "开启地图标记";
	MAP_PLUS_ACCEPT_MAP_NOTE = "接收其他玩家发送的标记";
	MAP_MARK_ENABLE = "开启NPC位置";
	

elseif (GetLocale() == "zhTW") then
	MOD_MAP_TOOLKIT = {"地圖工具", "ditugongju"};

	MOD_MAP_TOOLKIT_ENABLE_INSTANCE_MAPS = "開啟副本地圖";

	INSTANCE_MAPS_DISABLE_DELAY_TEXT = "|cff00c0c0<副本地圖>|r 你已經關閉副本地圖模組，該設置將在下次外掛程式載入時生效。";
	
	MAP_PLUS_ENABLE_TEXT = "開啟地圖標記";
	MAP_PLUS_ACCEPT_MAP_NOTE = "接收其他玩家發送的標記";
	
	MAP_MARK_ENABLE = "開啟NPC位置";
else
	MOD_MAP_TOOLKIT = "Map Toolkit";

	MOD_MAP_TOOLKIT_ENABLE_INSTANCE_MAPS = "Enable Instance Maps";

	INSTANCE_MAPS_DISABLE_DELAY_TEXT = "|cff00c0c0<Instance Maps>|r Instance Maps has been disabled. This setting will be available next time.";
	
	MAP_PLUS_ENABLE_TEXT = "Enable Map Note";
	MAP_PLUS_ACCEPT_MAP_NOTE = "Accept notes from other players";
	
end

if (IsConfigurableAddOn("InstanceMaps")) then
	ModManagement_RegisterMod(
		"MapToolkit",
		"Interface\\Icons\\INV_Misc_Toy_06",
		MOD_MAP_TOOLKIT,
		nil,
		nil,
		nil,
		{[6]=true}
	);

	ModManagement_RegisterCheckBox(
		"MapToolkit",
		MOD_MAP_TOOLKIT_ENABLE_INSTANCE_MAPS,
		nil,
		"EnableInstanceMaps",
		1,
		function (arg)
			if (arg == 1) then
				if (not BigFoot_IsAddOnLoaded("InstanceMaps")) then
					BigFoot_LoadAddOn("InstanceMaps");
				end
			else
				if (BigFoot_IsAddOnLoadedFromBigFoot("InstanceMaps")) then
					BigFoot_RequestReloadUI(function() BigFoot_Print(INSTANCE_MAPS_DISABLE_DELAY_TEXT); end);
				end
			end
		end
	);
end

if (IsConfigurableAddOn("MapPlus")) then
	
	ModManagement_RegisterCheckBox(
		"MapToolkit",
		MAP_PLUS_ENABLE_TEXT,
		nil,
		"EnableMapPlus",
		1,
		function (__arg)
			if (__arg==1)then
				if (not BigFoot_IsAddOnLoaded("MapPlus")) then
					BigFoot_LoadAddOn("MapPlus");
				end
			end
			if BigFoot_IsAddOnLoaded("MapPlus") then
				MapPlus_ToggleEnable(__arg)
			end
		end
	);
	
	ModManagement_RegisterCheckBox(
		"MapToolkit",
		MAP_PLUS_ACCEPT_MAP_NOTE,
		nil,
		"AcceptMapNote",
		1,
		function (__arg)
			if (__arg==1)then
				if (not BigFoot_IsAddOnLoaded("MapPlus")) then
					BigFoot_LoadAddOn("MapPlus");
				end
			end
			if BigFoot_IsAddOnLoaded("MapPlus") then
				MapPlus_ToggleReceive(__arg)
			end
		end,
		1
	);
	
end
if IsConfigurableAddOn("BigFootMark") then
	ModManagement_RegisterCheckBox(
		"MapToolkit",
		MAP_MARK_ENABLE,
		nil,
		"MapMarkEnable",
		1,
		function (__arg)
			if (__arg==1)then
				if (not BigFoot_IsAddOnLoaded("BigFootMark")) then
					BigFoot_LoadAddOn("BigFootMark");
				end
				BFM_ToggleEnable(1)
			else
				if BigFoot_IsAddOnLoaded("BigFootMark") then
					BFM_ToggleEnable(0)
				end
			end
			
		end
	);
end
